﻿using UnityEngine;
using UnityEditor;

using System;
using Hont;

public class GameDateTime_Test4_Parser : MonoBehaviour
{
    [ContextMenu("Parse Test1")]
    public void Test1()
    {
        var dateTime = TimeSpan.Parse("1.08:00:00");
        Debug.Log("dateTime:  days " + dateTime.Days + " hour: " + dateTime.Hours + " minute: " + dateTime.Minutes + " second: " + dateTime.Seconds);

        var dateTime2 = GameTimeSpanParser.Parse("1.08:00:00");
        Debug.Log("dateTime:  days " + dateTime2.Days + " hour: " + dateTime2.Hours + " minute: " + dateTime2.Minutes + " second: " + dateTime2.Seconds);
    }

    [ContextMenu("Parse Test2")]
    public void Test2()
    {
        var dateTime = GameDateTimeParser.Parse("3/20");
        Debug.Log("dateTime:  month " + dateTime.Month + " day: " + dateTime.Day);

        var dateTime2 = GameDateTimeParser.Parse("3/20/2008");
        Debug.Log("dateTime:  year " + dateTime2.Year + " month: " + dateTime2.Month + " day: " + dateTime2.Day);
    }
}
